home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / misc / sci / Framsticks.lha / FramsticksInstall / files / alife.inc next >
Encoding:
Text File  |  1997-12-02  |  5.6 KB  |  293 lines

  1. #include "colors.inc"
  2. #include "textures.inc"
  3. #include "woods.inc"
  4.  
  5. // parametry plotu
  6.  
  7. #declare DlugSegmPl = 5
  8. #declare WysokPl = 4
  9. #declare OdstepBePl = 1
  10. #declare WysokBePl = 1
  11. #declare IleBePl = 3
  12.  
  13. ///////////
  14.  
  15. // kolorki
  16.  
  17. #declare StaryRGB = <0.65,0.65,0.55>
  18. #declare Stary2RGB = <0.55,0.55,0.45>
  19. #declare StickRGB = <0.46,0.57,0.42>
  20. #declare WzmocRGB = <0.53,0.65,0.50>
  21. #declare WchlanRGB = <0.93,0.93,0> #declare AsymRGB = <0.14,1,0.14>
  22.  
  23. // alternatywny zestaw
  24. /*
  25. #declare StaryRGB = <0.3,0.3,0.2>
  26. #declare Stary2RGB = <0.2,0.2,0.2>
  27. #declare StickRGB = <0.5,0.5,0.5>
  28. #declare WzmocRGB = <0.6,0.6,0.6>
  29. #declare WchlanRGB = <1.0,1.0,0.2>
  30. #declare AsymRGB = <0.2,0.9,0.1>
  31. */
  32.  
  33. #declare Mie1RGB=<1,0.1,0.1>
  34. #declare Mie2RGB=<1,0,0>
  35. #declare Mie3RGB=<0.3,0,0>
  36.  
  37. // jak kiedys przyjdzie ci do glowy zmieniac ambient
  38. // to tylko tu
  39. #declare GlobalAmbient=3.0
  40.  
  41. global_settings
  42.  {
  43.  max_trace_level 50
  44.  adc_bailout 0.1
  45.  ambient_light GlobalAmbient
  46.  assumed_gamma 2.2
  47.  }
  48.  
  49. //fog 
  50. //{  distance 60   colour rgb<0.6, 0.8, 0.75> } //dist 16 ok
  51.  
  52. #declare SimpleStickTexture = texture
  53.     { pigment { color Red }
  54.       finish { phong 1 }
  55.    }
  56.  
  57. #declare WallTexture = texture { pigment {granite} }
  58.  
  59. #declare Border = 20.0
  60.  
  61. #declare Ground0Texture = texture
  62.     { 
  63.     pigment
  64. //   {color rgb <1,0.9,0.6>}
  65.      {
  66.      granite
  67.         color_map
  68.             {
  69.             [ 0.0 rgb <0.95, 0.90, 0.60> ]
  70.             [ 0.7 rgb <0.76, 0.70, 0.40> ]
  71.             [ 1.0 rgb <0.76, 0.70, 0.40> ]
  72.             }
  73.      scale 3
  74.      }
  75.     normal {bumps 0.2 scale 0.02} 
  76.     }
  77.  
  78. #declare UnderwaterTexture=texture
  79. {
  80.     pigment
  81.     {
  82.      granite
  83.     color_map
  84.       { [ 0 color Gray60 ]
  85.           [ 1 color White ] }
  86.     scale 2
  87.     }
  88. }
  89.  
  90. #declare HighTexture=texture
  91. {
  92.     pigment
  93.     {
  94.      crackle
  95.     color_map
  96.       { [ 0 color Gray40 ]
  97.           [ 0.1 color Gray80 ]
  98.           [ 1 color White ] }
  99.     }
  100. }
  101.  
  102. #declare WaterTexture = texture
  103. {
  104.  pigment { red 0.7 green 0.7 blue 1.0 filter 0.9 }
  105.  finish { refraction 1.0 ior 1.2 reflection 0.3 caustics 0.2 }
  106.  normal { bumps 0.5 scale 2 }
  107. }
  108.  
  109. #declare SzybkoscFal = <0,0,0.2>
  110.  
  111. #declare Chlup = merge
  112. {
  113. sphere { <0,0,0>,1 }
  114. sphere { <1,0.5,0>,1 }
  115. sphere { <0.5,-1,0.5>,1 }
  116. sphere { <-0.5,0.5,-1>,1 }
  117. scale 0.3
  118. texture { WaterTexture }
  119. }
  120.  
  121. light_source { <1000, -2000, 3000> color 
  122. // White
  123.  rgb <1.5,1.5,1.5>
  124.  }
  125.  
  126. // An area light (creates soft shadows)
  127. // WARNING: This special light can significantly slow down rendering times!
  128. /*
  129. light_source
  130. {
  131.   0*x // light's position (translated below)
  132.   color rgb 0.7  // light's color
  133.   // <widthVector> <heightVector> nLightsWide mLightsHigh
  134.   area_light
  135.   <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
  136.   4, 4                // total number of lights in grid (4x*4z = 16 lights)
  137.   adaptive 0          // 0,1,2,3... 
  138.   jitter              // adds random softening of light
  139.   translate <10, 10, -40>   // <x y z> position of light
  140. }
  141. */
  142.  
  143. sky_sphere {
  144.  
  145.     pigment {
  146.         gradient y
  147.         pigment_map {
  148.             [0.01 rgb <0.9, 0.92, 0.95> ] // horizon
  149.             [0.25
  150.  
  151.     wrinkles
  152.     turbulence 0.65
  153.     octaves 6
  154.     omega 0.7
  155.     lambda 2
  156.     color_map {
  157.         [0.0 color rgb <0.93,0.93,0.93>]
  158.         [0.1 color rgb <0.88,0.88,0.88>]
  159.         [0.5 color rgb <0.4, 0.4, 0.8>]
  160.         [1.001 color rgb <0.31, 0.36, 0.93>]
  161.     }
  162.     scale <1.5, 0.25, 1.5> rotate z*5]
  163.   [0.60
  164.     bozo
  165.     color_map {
  166.         [0.0 color rgb <0.95,0.95,0.95>]
  167.         [0.1 color rgb <0.9,0.9,0.9>]
  168.         [0.5 color rgb <0.4, 0.4, 0.8>]
  169.         [1.001 color rgb <0.04, 0.2, 0.66>]
  170.     }
  171.     turbulence 0.65
  172.     octaves 6
  173.     omega 0.707
  174.     lambda 2
  175.     scale <1.5, 0.6, 1.5> rotate z*10]
  176.         }
  177.     }
  178.  
  179.  rotate <90,0,0>
  180. }
  181.  
  182. //background { color SkyBlue }
  183.  
  184. #declare Ramie = union
  185.  {
  186.  cylinder { <0,0,0>,<0,0,10>,0.2 }
  187.  sphere { <0,0,0>,0.3 }
  188.  }
  189.  
  190. #declare Palec = union
  191.  {
  192.  cylinder { <0,0,0>,<-1,0,-1>,0.17 }
  193.  sphere { <-1,0,-1>,0.17 }
  194.  cone { <-1,0,-1>,0.17,<0,0,-2>,0.1 }
  195.  sphere { <0,0,-2>,0.1 }
  196.  }
  197.  
  198. #declare RekaTexture=texture {Aluminum}
  199.  
  200. #declare Reka = union
  201.  {
  202.  object {Ramie}
  203.  object {Palec rotate <0,30,0>}
  204.  object {Palec rotate <0,30,180>}
  205.  translate <0,0,2>
  206.  texture {RekaTexture}
  207.  scale 0.5
  208.  }
  209. #declare RekaTrzym = union
  210.  {
  211.  object {Ramie}
  212.  object {Palec rotate <0,5,0>}
  213.  object {Palec rotate <0,5,180>}
  214.  translate <0,0,2>
  215.  texture {RekaTexture}
  216.  scale 0.5
  217.  }
  218.  
  219.  
  220. #declare BelkaPl = object
  221. {
  222. cylinder { <-0.4-DlugSegmPl/2,0,0>,<DlugSegmPl/2+0.4,0,0>,0.15
  223.  texture { T_Wood17 scale 0.6 rotate <0,90,0> } }
  224. }
  225.  
  226. #declare SlupekPl = union
  227. {
  228. box { <-0.2,-0.2,0>,<0.2,0.2,WysokPl> }
  229.   union
  230.   {
  231.   triangle { <-0.2,-0.2,0>,<-0.2,0.2,0>,<0,0,0.2> }
  232.   triangle { <-0.2, 0.2,0>,< 0.2,0.2,0>,<0,0,0.2> }
  233.   triangle { < 0.2, 0.2,0>,< 0.2,-0.2,0>,<0,0,0.2> }
  234.   triangle { < 0.2,-0.2,0>,<-0.2,-0.2,0>,<0,0,0.2> }
  235.    translate WysokPl*z
  236.   }
  237. texture { T_Wood17 scale 0.8 } 
  238. }
  239.  
  240. #declare SegmentPl = union
  241. {
  242. object { SlupekPl }
  243. #declare N=IleBePl
  244. #declare Y=WysokBePl
  245. #declare R=seed(3333)
  246. #while (N>0)
  247.  #declare N=N-1
  248.  object { BelkaPl rotate <360*rand(R),(rand(R)-0.5)*20*atan2(OdstepBePl,DlugSegmPl),0> translate <DlugSegmPl/2,0,Y> }
  249.  #declare Y=Y+OdstepBePl
  250. #end
  251. }
  252.  
  253. #declare KolorDymu = color rgbf <0.7, 0.7, 0.6, 0>
  254. //#declare KolorDymu = color rgbf <0.9, 0.9, 0.8, 0>
  255.  
  256. #declare DymTexture = texture
  257. {
  258.   pigment { bozo scale 0.3 }
  259.   finish {ambient 1.0/GlobalAmbient diffuse 0}
  260. }
  261.  
  262. #declare JedzonkoTexture = texture
  263. {
  264. pigment { marble
  265.   color_map {
  266.    [ 0 color White ]
  267.    [ 0.1 color rgbf <1,1,0.3,0.6> ]
  268.    [ 0.2 color rgbf <1,0.8,0,0.8> ]
  269.    [ 0.6 color rgbf <1,0.5,0,0.95>]
  270.             }
  271.         turbulence 0.5
  272.         }
  273.     finish { ambient 1 }
  274. }
  275.  
  276. #declare Asymil=0.25
  277. #declare Szorst=0.25
  278. #declare Wytrz=0.25
  279. #declare Wchlan=0.25
  280. #declare Stary=0
  281. #declare Szybk=0.25
  282. #declare Zniszcz=0
  283.  
  284. #declare MiesZgi=0
  285. #declare Zgiecie=0
  286.  
  287. #declare MiesObr=0
  288. #declare Obrot=0
  289.  
  290. #declare ReceptG=0
  291. #declare ReceptT=0
  292. #declare ReceptS=0
  293.